<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page session="false" %>
<%@ page isELIgnored ="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<script type="text/javascript">
//<![CDATA[
(function(){
	dojo.byId("lbl_org_edit_typecode").innerHTML = Organization._resource.organizationCode ;
	$kdom.appendDojoProp("input_org_edit_typecode","missingMessage",$ksub(KppModule.commonResource.missingMessage,[Organization._resource.organizationCode]));
	$kdom.appendDojoProp("input_org_edit_typecode","invalidMessage",Organization._resource.invalidKeyString);
	dojo.byId("lbl_org_edit_label").innerHTML = Organization._resource.organizationlabel;
	$kdom.appendDojoProp("input_org_edit_label","missingMessage",$ksub(KppModule.commonResource.missingMessage,[Organization._resource.organizationlabel]));
	$kdom.appendDojoProp("btn_org_edit_save","label",KppModule.commonResource.save);
	$kdom.appendDojoProp("btn_org_edit_cancel","label",KppModule.commonResource.cancel);
	dojo.byId("lbl_user_edit_active").innerHTML = KppModule.commonResource.activeLabel;
	dojo.byId("lbl_user_edit_active_yes").innerHTML = Organization._resource.activeYes;
	dojo.byId("lbl_user_edit_active_no").innerHTML = Organization._resource.activeNo;
	if("${org.activeFlag}"=="true"){
		$kdom.appendDojoProp("ipt_user_edit_active_yes","checked","true");
	}else{
		$kdom.appendDojoProp("ipt_user_edit_active_no","checked","true");
	}
})();
//]]>
</script>
<span style="display:none">To solve IE7/8 script event tag problem.</span>
<div data-dojo-type="dijit.form.Form" data-dojo-props="action:'../../organization/org/${org.id}/edit.do',id:'frm_org_edit'">
	<table width="100%" cellspacing="10">
		<tr>
			<td><label id="lbl_org_edit_typecode">data dictionary type code</label></td>
			<td><input id="input_org_edit_typecode" data-dojo-type="dijit/form/ValidationTextBox" data-dojo-props="required:true,trim:true,name:'code',maxLength:20,regExp:'[a-zA-Z][a-zA-Z0-9\\-_\\.]*'" value="${org.code}"></input></td>
		</tr>
		<tr>
			<td><label id="lbl_org_edit_label">data dictionary type label</label></td>
			<td><input id="input_org_edit_label" data-dojo-type="dijit/form/ValidationTextBox" data-dojo-props="required:true,trim:true,name:'label'" value="${org.label}"></input></td>
		</tr>
		<tr>
			<td><label id="lbl_user_edit_active">Active</label></td>
			<td><div data-dojo-type="dijit/form/RadioButton" data-dojo-props="name:'activeFlag',value:'1'" id="ipt_user_edit_active_yes"></div><label id="lbl_user_edit_active_yes">yes</label>
				<div data-dojo-type="dijit/form/RadioButton" data-dojo-props="name:'activeFlag',value:'0'" id="ipt_user_edit_active_no"></div><label id="lbl_user_edit_active_no">no</label>
			</td>
		</tr>
	</table>
</div>
<div class="dialogFooter">
	<div id="btn_org_edit_save" data-dojo-type="dijit/form/Button" data-dojo-props="iconClass:'dijitEditorIcon dijitEditorIconSave', showLabel:true" style="width:70px;">
		<script type="dojo/on" data-dojo-event="click" data-dojo-args="evt">
			var options={
								domain:Organization._resource.organization,
								refresh:Org.refresh,
								button:this,
								dialogId:"organization_edit",
								formId:"frm_org_edit",
								resource:Organization._resource
						};
			KppModule.restProxy(options).putUpdate();
		</script>
	</div>
	<div id="btn_org_edit_cancel" data-dojo-type="dijit/form/Button" data-dojo-props="iconClass:'dijitEditorIcon dijitEditorIconUndo', showLabel:true" style="width:70px;">
		<script type="dojo/on" data-dojo-event="click" data-dojo-args="evt">
				dijit.byId("organization_edit").hide();
		</script>
	</div>
</div>